import Koa from 'koa'
import { appPort } from './config/appSetting.js';
import { useControllers } from './controllers/index.js';
import { sync } from './db/index.js';


await sync()
let app = new Koa()

app.use(async (ctx,next) => {
    await next()
})

useControllers(app)

app.listen(appPort)


console.log(`http://localhost:${appPort}`)
